package com.shenmazong.servereduresume.controller;

import com.baomidou.mybatisplus.extension.service.IService;
import com.shenmazong.servereduresume.dto.TbEducation;
import com.shenmazong.servereduresume.service.TbEducationService;
import com.shenmazong.utils.ResultResponse;
import com.shenmazong.vo.BatchChooseIdVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 *
 */
@RestController
@RequestMapping("education")
public class TbEducationController {
    @Autowired
    private TbEducationService tbEducationService;
    @PostMapping("findByInformation")
    public ResultResponse findByInformation(@RequestBody BatchChooseIdVo batchChooseIdVo){
        return tbEducationService.findByInformation(batchChooseIdVo);
    }
    @PostMapping("saveEducation")
    public ResultResponse saveEducation(@RequestBody TbEducation tbEducation){
        return tbEducationService.saveEducation(tbEducation);
    }
    @PostMapping("updateEducation")
    public ResultResponse updateEducation(@RequestBody TbEducation tbEducation){
        return tbEducationService.updateEducation(tbEducation);
    }
    @PostMapping("deleteEducation")
    public ResultResponse deleteEducation(@RequestBody BatchChooseIdVo batchChooseIdVo){
        return tbEducationService.deleteEducation(batchChooseIdVo);
    }
}
